Samples

After successful installation of the client, you can get files of sample programs under the installation path of the client. Based on these provided sample programs, corresponding functions can be achieved in your programs.
Note
Only the console sample program is described here. Get the corresponding sample code file from .\Development\Samples\Python under the client installation path.
In the folder of Sample Program, the sample program categories are as follows:

Basic Sample Programs

You can get basic sample programs under the path of .\Development\Samples\General. The basic sample programs, including camera connection, image acquisition, image processing, parameter configuration, and events, are as follows.
Basic Sample Program of Camera Connection
File Name Sample Program Description
ConnectSpecCamera.py Connect to Camera by IP Address It shows how to connect the camera to your program by camera IP address and NIC IP address corresponding to the camera.
Note
Enter IP address in the format of xx.xx.xx.xx.


Basic Sample Programs of Image Acquisition
File Name Sample Program Description
GrabImage.py Get Image(s) via Polling It shows how to get images via polling.
Grab_Callback.py Get Image(s) via Callback It shows how to get images via callback function.


Basic Sample Programs of Image Processing
File Name Sample Program Description
ConvertPixelType.py Convert Image Format It shows how to convert the raw image data acquired by the camera to the desired pixel format via the image format conversion API.
HighBandwidthDecode.py High-Bandwidth Lossless Compression It shows how to decode lossless compression stream from the camera into raw data via high-bandwidth lossless compression related algorithm.
ImageSave.py Save Image(s) from Camera(s) It shows how to save one or more images from cameras in RAW, JPEG, BMP, TIFF, and PNG format.
Recording.py Save Video(s) It shows how to save videos recorded by the camera.


Basic Sample Programs of Parameter Configuration
File Name Sample Program Description
MultiCast.py Set Multicast Mode It shows how to set transmission mode to multicast mode, that is, querying the user to launch the multicast controlling application or the multicast monitoring application, and opening camera and setting multicast mode in the specified access permission.
ParametrizeCamera_FileAccess.py Import File(s) to / Export File(s) from Camera(s) It shows how to import files to / export files from cameras, and get file access progress.
ParametrizeCamera_LoadAndSave.py Import/Export Camera Feature File(s) It shows how to export camera feature tree settings to INI files and import INI files to camera feature tree settings.


Basic Sample Program of Event
File Name Sample Program Description
Events.py Get Camera Event(s) It shows how to configure camera event features, register an event callback, and process the events acquired from the event callback. Event example: ExposureEnd.


Sample Programs of Frame Grabber

You can get basic sample programs under the path of .\Development\Samples\FrameGrabber.
File Name Sample Program Description
Events_Interface.py Turn on Frame Grabber and Receive Event(s) It shows how to turn on the frame grabber and receive one or more events.
InterfaceAndDevice.py Control Camera(s) Connected to Frame Grabber(s) It shows how to enumerate one or more cameras connected to the self-developed frame grabber via enumeration APIs and perform operations such as turning on cameras and grabbing images.
InterfaceDemo.py Enumerate and Control Frame Grabber(s) It shows how to enumerate one or more frame grabbers via enumeration APIs and perform operations such as turning on frame grabbers and setting attributes.


Sample Program of Area Scan Camera

You can get basic sample program under the path of .\Development\Samples\AreaScanCamera.
File Name Sample Program Description
ParametrizeCamera_AreaScanIOSettings.py Configure IO Settings of Area Scan Cameras It shows how to configure trigger node IO of area scan camera.


Sample Programs of Line Scan Camera

You can get basic sample programs under the path of .\Development\Samples\LineScanCamera.
File Name Sample Program Description
BasicDemoLineScanCamera.py Basic Sample Program of Line Scan Camera It shows how to use line scan cameras, including initializing SDK resources, enumerating devices, and creating instances and handles.
Grab_LineStart.py Get Image(s) of Line Scan Camera via Thread It shows how to set the line scan camera to get images in the specified thread.
LineScanSoftwareTrigger.py Set Software Trigger of Line Scan Camera It shows how to set the software trigger of line scan cameras.
MultiLightCtrl_ImageStitching.py Multi-Light Control, Image Splitting, and Image Stitching of Line Scan Camera It shows how to set multi-light control parameters (the default is 2), split the image and stitch the divided images in top-bottom direction to create a new image, and save the new image to local in BMP format.
ParametrizeCamera_LineScanIOSettings.py Configure IO Settings of Line Scan Camera It shows how to configure node IO settings of frame trigger and line trigger for line scan cameras.